userns: Avoid ABI change for CVE-2017-6874 fix
authorBen Hutchings <ben@decadent.org.uk>
Tue, 14 Mar 2017 21:35:33 +0000 (21:35 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 30 Mar 2017 01:16:33 +0000 (01:16 +0000)
The type of ucounts::count changed from atomic_t to int.  But they're
the same size, and it's only accessed within kernel/ucount.c, so hide
the change from genksyms.

Gbp-Pq: Topic debian
Gbp-Pq: Name userns-avoid-abi-change-for-cve-2017-6874-fix.patch

include/linux/user_namespace.h

index dc797739f164a7e60e5e0193e067796dc0290bb1..6d77349de3d0131839a92c38ec27248c3ffbf08f 100644 (file)
@@ -65,7 +65,11 @@ struct ucounts {
        struct hlist_node node;
        struct user_namespace *ns;
        kuid_t uid;
+#ifdef __GENKSYMS__
+       atomic_t count;
+#else
        int count;
+#endif
        atomic_t ucount[UCOUNT_COUNTS];
 };